package com.wuyou.designPatterns.factory.factoryMethod.framework;

public abstract class Factory {


    public final Product create(String owner){
        Product product = createProduct(owner);
        registerProduct(product);
        System.out.println(this.getClass());
        return product;
    }

    protected abstract Product createProduct(String owner);

    protected abstract void registerProduct(Product product);
}
